home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / glass / glass.lha / GLASS / libtmc / fsccbrac.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-11-06  |  1.3 KB  |  49 lines

  1. /* 
  2.    Copyright (C) 1990 C van Reewijk, email: dutentb.uucp!reeuwijk
  3.  
  4. This file is part of GLASS.
  5.  
  6. GLASS is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. GLASS is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GLASS; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* File: fsccbrac.c
  21.  * Last modified: CvR
  22.  *
  23.  * Handling of close brackets around constructors and lists.
  24.  */
  25.  
  26. /* Standard UNIX libraries. */
  27. #include <stdio.h>
  28. #include <ctype.h>
  29.  
  30. /* The header of this library */
  31. #include "tmc.h"
  32. #include "config.h"
  33.  
  34. #define CLOSEBRAC ')'
  35.  
  36. /* Skip all `isspace()' characters, and try to read `n' close
  37.  * brackets. Give an error if this is not possible.
  38.  */
  39. int fscanclosebrac( f, n )
  40.  FILE *f;
  41.  int n;
  42. {
  43.     while( n>0 ){
  44.         if( tmfneedc( f, CLOSEBRAC ) ) return( 1 );
  45.     n--;
  46.     }
  47.     return( 0 );
  48. }
  49.